<?php


namespace app\common\model;


use think\Model;

class LiveHistoryModel extends Model
{
    protected $connection = 'db_live';

    public function anchor()
    {
        return $this->hasOne(UserModel::class, 'id', 'anchorid')->with('profile');
    }

    public function category()
    {
        return $this->hasOne(LiveCategoryModel::class, 'id', 'categoryid');
    }

    public function matches()
    {
        return $this->hasOne(MatchesScheduleModel::class, 'match_id', 'matchid');
    }
}